package org.zsl.mybatis.app;

import org.apache.ibatis.session.SqlSession;
import org.zsl.mybatis.mapper.UserMapper2;
import org.zsl.mybatis.model.User;
import org.zsl.mybatis.util.SqlSessionFactory;

import java.io.IOException;

public class Client8 {

    public static void main(String[] args) throws IOException {
        SqlSession session =SqlSessionFactory.getSqlSession2();
        UserMapper2 mapper2=  session.getMapper(UserMapper2.class);

       User user= mapper2.selectById(1);
        System.out.println(user);

        session.close();
    }
}
